import request from '../utils/request'

// banner
const fetchBanner = (params = {}) => request.get('banner/list', { params })
// 分类
const fetchCarts = (params = {}) => request.get('shop/goods/category/all', { params })
// 商品列表
const fetchItems = (params = {}) => request.post('shop/goods/list', params)
// 商品详情
const fetchItemById = (id) => request.get('shop/goods/detail?id=' + id)
export {
  fetchBanner,
  fetchCarts,
  fetchItems,
  fetchItemById
}
